//#Author:bin
// -*- charset = utf-8 -*-
// @time:2021/12/26 20:10
// @Author:bfl91
// @file : footprint.js
// @Software:WebStorm
export default {
    namespaced:true,
    state:{
        footprintList:[]
    },
    mutations:{
        //添加足迹
        setfootprint(state,obj) {
            for(var i in state.footprintList){
                if(state.footprintList[i].goods_id==obj.goods_id){
                    return
                }
            }
            state.footprintList.push(obj)
        },
        reovemShop(state,index){
              state.footprintList.splice(index,1);
        }
    },
    getters:{
          getfootprintList(state){
              let number= state.footprintList.length;
              let list= state.footprintList;
              return{
                  number,list
              }
          }
    }
}